﻿USE CodeStash
GO

/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
COMMIT
BEGIN TRANSACTION
GO
ALTER TABLE dbo.CodeSnippet ADD
	Views int NULL,
	Rating int NULL,
	TotalRatings int NULL
GO
ALTER TABLE dbo.CodeSnippet ADD CONSTRAINT
	DF_CodeSnippet_Views DEFAULT 0 FOR Views
GO
ALTER TABLE dbo.CodeSnippet ADD CONSTRAINT
	DF_CodeSnippet_Rating DEFAULT 0 FOR Rating
GO
ALTER TABLE dbo.CodeSnippet ADD CONSTRAINT
	DF_CodeSnippet_TotalRatings DEFAULT 0 FOR TotalRatings
GO
COMMIT
